package org.dromara.system.domain.policy.bo;

import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import org.dromara.system.domain.policy.Policy;

/**
 * 承保单主业务对象 policy
 *
 * @author Lion Li
 * @date 2025-11-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Policy.class, reverseConvertGenerate = false)
public class PolicyBo extends BaseEntity {

    /**
     * 自增主键
     */
    @NotNull(message = "自增主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 保单号（批量查询字段）
     */
    @NotBlank(message = "保单号（批量查询字段）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String policyId;

    /**
     * 投保单号（批量查询字段）
     */
    @NotBlank(message = "投保单号（批量查询字段）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String applicationId;

    /**
     * 保单生效时间
     */
    @NotBlank(message = "保单生效时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private String effectiveTime;

    /**
     * 保单终止时间
     */
    @NotBlank(message = "保单终止时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private String expireTime;

    /**
     * 产品编码
     */
    @NotBlank(message = "产品编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productCode;

    /**
     * 险种编码
     */
    @NotBlank(message = "险种编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String insuranceCode;

    /**
     * 险种编码名称
     */
    @NotBlank(message = "险种编码名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String insuranceCodeName;

    /**
     * 险种名称
     */
    @NotBlank(message = "险种名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String insuranceName;

    /**
     * 用户PIN
     */
    @NotBlank(message = "用户PIN不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userPin;

    /**
     * 店铺ID
     */
    @NotBlank(message = "店铺ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String shopId;

    /**
     * 店铺名称
     */
    @NotBlank(message = "店铺名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String shopName;

    /**
     * 商品编码
     */
    @NotBlank(message = "商品编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String commodityCode;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String commodityName;

    /**
     * 主商品品牌
     */
    @NotBlank(message = "主商品品牌不能为空", groups = { AddGroup.class, EditGroup.class })
    private String brand;

    /**
     * 主商品型号
     */
    @NotBlank(message = "主商品型号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String model;

    /**
     * 收货省ID
     */
    @NotBlank(message = "收货省ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String receiveProvinceId;

    /**
     * 主商品订单号（批量查询）
     */
    @NotBlank(message = "主商品订单号（批量查询）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mainOrderId;

    /**
     * 商家ID
     */
    @NotBlank(message = "商家ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String merchantId;

    /**
     * 一级类目ID
     */
    @NotBlank(message = "一级类目ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String firstCategoryId;

    /**
     * 二级类目ID
     */
    @NotBlank(message = "二级类目ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String secondCategoryId;

    /**
     * 主商品三级类目
     */
    @NotBlank(message = "主商品三级类目不能为空", groups = { AddGroup.class, EditGroup.class })
    private String thirdCategoryName;

    /**
     * 保单状态
     */
    @NotBlank(message = "保单状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String policyStatus;

    /**
     * 是否实收
     */
    @NotBlank(message = "是否实收不能为空", groups = { AddGroup.class, EditGroup.class })
    private String isReceived;

    /**
     * 是否共保
     */
    @NotBlank(message = "是否共保不能为空", groups = { AddGroup.class, EditGroup.class })
    private String isCoInsurance;

    /**
     * 业务来源（多条件查询）
     */
    @NotBlank(message = "业务来源（多条件查询）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String businessSource;

    /**
     * 保单创建日期（分区键）
     */
    @NotNull(message = "保单创建日期（分区键）不能为空", groups = { EditGroup.class })
    private String createDate;

    /**
     * 应收保费(保费实收)
     */
    private Long premiumReceivable;

    /**
     * 保额
     */
    private Long insuredAmount;

    /**
     * 保障期间值
     */
    private String coveragePeriod;

    /**
     * 标的物数量
     */
    private String subjectQuantity;

    /**
     * 主商品京东价
     */
    private Long mainCommodityPrice;

    /**
     * 标的物类目ID
     */
    private String subjectCategoryId;

    /**
     * 佣金率
     */
    private String commissionRate;

    /**
     * 订单总金额
     */
    private Long orderTotalAmount;

    /**
     * 请求标识
     */
    private String requestId;

    /**
     * 主商品二级类目
     */
    private String twoCategoryName;

    /**
     * 主商品一级类目
     */
    private String oneCategoryName;
}
